﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Rhino.Mocks;

namespace Habanero.Testing.Base
{
// ReSharper disable UnusedMember.Global
    public static class RhinoExtensions
    {
        public static void ClearStubReturnValues<T>(this T mockObj)
        {
            // Switch back to record and then to replay - that 
            // clears all behaviour and we can program new behavior.
            // Record/Replay do not occur otherwise in our tests, that another method of
            // using Rhino Mocks.
            mockObj.BackToRecord(BackToRecordOptions.All);
            mockObj.Replay();
        }
    }
    // ReSharper restore UnusedMember.Global
}
